package com.itheima.anno;

import java.lang.reflect.Method;

public class Demo {
    public static void main(String[] args) throws Exception{
        Class clazz = Class.forName("com.itheima.anno.Test");
        Test test = (Test) clazz.newInstance();

        Method[] methods = clazz.getDeclaredMethods();
        for (Method method : methods) {
            if (method.isAnnotationPresent(Anno.class)){
                method.invoke(test);
            }
        }
    }
}
